<div class="syntax"><pre><span class="c"># Continue</span>
<span class="n">nlist</span> <span class="o">=</span> <span class="p">[]</span>
<span class="k">for</span> <span class="n">i</span> <span class="ow">in</span> <span class="nb">xrange</span><span class="p">(</span><span class="mf">0</span><span class="p">,</span><span class="mf">100</span><span class="p">):</span>
    <span class="k">if</span> <span class="n">i</span> <span class="o">==</span> <span class="mf">0</span><span class="p">:</span>
        <span class="k">continue</span>
    <span class="n">nlist</span><span class="o">.</span><span class="n">append</span><span class="p">(</span> <span class="mf">7</span> <span class="o">/</span> <span class="n">i</span> <span class="p">)</span>

<span class="c"># Break</span>
<span class="c"># How many heads can we flip in a row?</span>
<span class="n">heads</span> <span class="o">=</span> <span class="mf">0</span>
<span class="k">while</span> <span class="mf">1</span><span class="p">:</span>
    <span class="k">if</span> <span class="n">x</span> <span class="o">==</span> <span class="mf">0</span><span class="p">:</span>
        <span class="k">break</span>
    <span class="k">else</span><span class="p">:</span>
        <span class="n">x</span> <span class="o">=</span> <span class="n">random</span><span class="o">.</span><span class="n">rand</span><span class="p">(</span><span class="mf">0</span><span class="p">,</span><span class="mf">1</span><span class="p">)</span>
        <span class="n">heads</span> <span class="o">+=</span> <span class="mf">1</span>

<span class="c"># Pass</span>
<span class="c"># If you don&#39;t want to do anything in a case</span>
<span class="n">x</span> <span class="o">=</span> <span class="mf">0</span>
<span class="k">while</span> <span class="mf">1</span><span class="p">:</span>
    <span class="k">if</span> <span class="n">x</span> <span class="o">&lt;=</span> <span class="mf">100</span><span class="p">:</span>
        <span class="k">pass</span>
    <span class="k">elif</span> <span class="n">x</span> <span class="o">==</span> <span class="mf">101</span><span class="p">:</span>
        <span class="k">print</span> <span class="s">&quot;Just enough Dalmations!&quot;</span>
    <span class="k">else</span><span class="p">:</span>
        <span class="k">print</span> <span class="s">&quot;Argh!  Too many Dalmations!&quot;</span>
        <span class="k">break</span>
    <span class="n">x</span> <span class="o">+=</span> <span class="mf">1</span>
</pre></div>
